*do start
*do read_in_data
*do call_length 17
**calls length.do with N=17 instances of Stata to speed up processing. 
*do shortest_mismatcher
*do call_entropy_calculation 17
**calls entropy_calculation.do . 
*do call_entropy_constant 17
**calls calc_entropy_constant.do . 
*do call_entropy_constant_fullshuffle 10
**calls calc_entropy_constant_fullshuffle.do, for D_order words are shuffled per book instead of per vers, here, textsize in words is held constant. 
****produce figures***
*do fig1
*do fig2
*do fig3
*do fig4
*do fig5
*do figS1
****prepare final data sets
*do final_data

***********Revision***********
*do intro
******************************************************************
*/* Validation: randomly inserting spaces */

***Valdiation II_a: Baseline - original string
*do call_length_validation_II_a 17
*****calls length_validation_II_a.do with N=17 
*do shortest_mismatcher_validation_II_a 
*do call_entropy_calculation_validation_II_a 17
*****calls entropy_calculation_validation_II_a.do 

****Valdiation II_u: Additional basline test: delete all spaces before entropy calculation
*do call_length_validation_II_u 17
******calls length_validation_II_u.do with N=17 
*do shortest_mismatcher_validation_II_u 
*do call_entropy_calculation_validation_II_u 17
******calls entropy_calculation_validation_II_u.do 

***Valdiation II_b: randomly inserting spaces (language specific version)
*do call_length_validation_II_b 17
*****calls length_validation_II_b.do with N=17 
*do shortest_mismatcher_validation_II_b 
*do call_entropy_calculation_validation_II_b 17
*****calls entropy_calculation_validation_II_b.do 

***Valdiation II_c: randomly inserting spaces (language specific RANDOM INSERT version)
*do call_length_validation_II_c 17
*****calls length_validation_II_c.do with N=17 
*do shortest_mismatcher_validation_II_c 
*do call_entropy_calculation_validation_II_c 17
*****calls entropy_calculation_validation_II_c.do 

***Valdiation II_d: randomly inserting spaces (p50(MEDIAN) version)
*do call_length_validation_II_d 17
*****calls length_validation_II_d.do with N=17 
*do shortest_mismatcher_validation_II_d 
*do call_entropy_calculation_validation_II_d 17
*****calls entropy_calculation_validation_II_d.do 

***Valdiation II_e: randomly inserting spaces (p25 version)
*do call_length_validation_II_e 17
*****calls length_validation_II_e.do with N=17 
*do shortest_mismatcher_validation_II_e 
*do call_entropy_calculation_validation_II_e 17
*****calls entropy_calculation_validation_II_e.do 

***Valdiation II_f: randomly inserting spaces (p75 version)
*do call_length_validation_II_f 17
*****calls length_validation_II_f.do with N=17 
*do shortest_mismatcher_validation_II_f 
*do call_entropy_calculation_validation_II_f 17
*****calls entropy_calculation_validation_II_f.do 

***Valdiation II_g: apply masking/scrambling twice
*do call_length_validation_II_g 17
*****calls length_validation_II_g.do with N=17 
*do shortest_mismatcher_validation_II_g 
*do call_entropy_calculation_validation_II_g 17
*****calls entropy_calculation_validation_II_g.do 

*Prepare Validation Table (Table 2 in the paper)
*do validation_tableI

******************************************************************
*/*Convergence */

***Valdiation III: convergence test | 
**generic montemurro&zanette: cut text at 75% and allow 5% difference between the entropy values 
*do call_entropy_calculation_validation_III 17
*****calls entropy_calculation_validation_III.do 

***Valdiation IV: convergence test | 
**generic montemurro&zanette with different setting: cut text at 50% and allow 10% difference between the entropy values 
*do call_entropy_calculation_validation_IV 17
*****calls entropy_calculation_validation_IV.do 

***Valdiation V: convergence test | 
**generic montemurro&zanette with different setting: cut text at 87.5% and allow 2.5% difference between the entropy values 
*do call_entropy_calculation_validation_V 17
*****calls entropy_calculation_validation_V.do 

***Valdiation VI: one big string
****generate one big string out of all available new testament books
*do call_length_validation_VI 17
****calls length_validation_I.do with N=17 
*do shortest_mismatcher_validation_VI 
*do call_entropy_calculation_validation_VI 17
***calls entropy_calculation_validation_VI.do 

***merge with book data and produce trade off correlation table
*do correlation_table
******************************************************************

***Valdiation VII: constant string size in chars
*do call_entropy_calculation_validation_VII 17
****calls entropy_calculation_validation_VII.do 
*do fig1_validation VII 
 

*do validation_tableII

******************************************************************
******Valdiation X: one big string time series version
*do call_entropy_calculation_validation_X 17
**calls entropy_calculation_validation_X.do 

*do fig6
exit


contact:

Alexander Koplenig <koplenig@ids-mannheim.de>


